home *** CD-ROM | disk | FTP | other *** search
- public data, spack, rpack, portval, port1, port2, port3, port4, hierr
- public prtbase, nports, sleep, spause
-
- include ccsdef.h
-
- biostod equ 1ah ; Bios time of day tic routine
- stat_suc equ 0 ; success
- stat_tmo equ 1 ; timeout
- stat_chk equ 2 ; checksum mismatch
- stat_ptl equ 4 ; packet too long
- stat_int equ 8 ; user interrupt
- stat_eol equ 10h ; eol char seen
-
- datas segment public 'datas'
- extrn flags:byte, trans:byte, pack:byte, fsta:word, fmtdsp:byte
- extrn isccdos:byte ; Jun 25,1990
-
- prtbase label byte
- port1 prtinfo <0FFFH,0,defpar,1,0,defhand,floxon>
- port2 prtinfo <0FFFH,0,defpar,1,0,defhand,floxon>
- port3 prtinfo <0FFFH,0,defpar,1,0,defhand,floxon>
- port4 prtinfo <0FFFH,0,defpar,1,0,defhand,floxon>
- rept portmax-4
- prtinfo <0FFFH,0,defpar,1,0,defhand,floxon>
- endm
-
- ;; systems with two ports can set portval to port1 or port2.
- ;; systems with more than two ports can set nports higher,
- ;; then set portval to the address prtbase+(#-1)*size prtinfo
- ;; where # is the desired port.
-
- portval dw port1 ; Default is to use port 1.
- nports db 2 ; # of known ports
- hierr db 0 ; Non-ascii char (non-zero if yes).
- parmsk db 0ffh ; parity mask (0FFH for 8bit data path) [umd]
- spmes db 'Spack: $'
- rpmes db 'Rpack: $'
- crlf db cr,lf,'$'
- cemsg db 'User intervention$'
- ccemsg db '╙├╗º╕╔╘ñ$'
-
- sixzero dw 60 ; for div operation in rec packet timeouts
- ninefive dw 95 ; for mult/div with long packets
- temp dw 0
- tmp db 0
- linecnt dw 0 ; debug line width counter
- spause db 0 ; # millisec to wait before sending pkt
- prvtyp db 0 ; Type of last packet sent
- pktptr dw 0 ; Position in receive packet.
- chksum dw 0 ; running checksum (two char)
- chrcnt dw 0 ; number of bytes in data field of a packet
- status dw 0 ; status of packet receiver (0 = ok)
- pktype db 0 ; received packet TYPE holding area
- debflg db 0 ; debug display, send/receive flag
- tmpflg db 0 ; flags.cxzflg at entry to rpack
- timeit db 0 ; arm timeout counter
- fairflg dw 0 ; fairness flag, for console/port reads.
- time dw 2 dup (0) ; Sleep, when we should timeout.
- rptim db 4 dup (0) ; read packet timeout slots
- spkcnt dw 0 ; number of bytes sent in this packet
- rpkcnt dw 0 ; number of bytes received in this packet
-
- ; Prolog, Data, Trailer must be kept together
- prolog db 8 dup (?) ; Packet header (SOH, LEN, SEQ, TYPE, xlen)
- data db maxpack+10 dup (?) ; Data field of packet (used in many places)
- ; checksum, eol, handshake + null term
- datas ends
-